package com.lrs.java.j2se_base.oo_thinking;
public class TestStaticField {
    
	private static int sid = 0;
    private String name; 
    int id;
    
    TestStaticField(String name) {
        this.name = name;  
        id = sid++;
    }
    
    public void info(){
        System.out.println("My name is "+name+" No."+id);
    }
    
    public static void main(String arg[]){

        TestStaticField.sid = 100;
        TestStaticField mimi = new TestStaticField("mimi");
//        Cat.sid = 2000;
        mimi.sid = 2000;
        TestStaticField pipi = new TestStaticField("pipi");
        mimi.info(); 
        pipi.info();
    }
}
